home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM A / PD-ROM A.iso / HyperCard / Utility / Stack Analyzer / stack_-1.xml < prev   
Encoding:
Extensible Markup Language  |  1991-03-30  |  13.5 KB  |  20 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>1</cardCount>
  7.     <cardID>2871</cardID>
  8.     <listID>2240</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>on parseStack
  17. global holdMyPlace, theTargetStack, theTextFile, theTextDump, ¬¨
  18. theScript, theLeadSpace, theTargetBkgd
  19. go to theTargetStack
  20. put the script of this stack into theScript
  21. put the number of backgrounds into theBkgdCnt
  22. write return & " ->   # of cards:" ¬¨
  23. & the number of cards in this stack ¬¨
  24. & "   # of backgrounds:" & theBkgdCnt ¬¨
  25. to file theTextFile
  26. write return & "      size:" & the size of this stack ¬¨
  27. & "   freespace:" & the freeSize of this stack ¬¨
  28. to file theTextFile
  29. write return & "      cantModify:" & the cantModify of this stack ¬¨
  30. & "   cantPeek:" & the cantPeek of this stack ¬¨
  31. & "   cantAbort:" & the cantAbort of this stack ¬¨
  32. & return to file theTextFile
  33. put " number of backgrounds = " & theBkgdCnt ¬¨
  34. & "    number of cards = " & the number of cards in this stack ¬¨
  35. into statusLine
  36. go to holdMyPlace
  37. put return & statusLine & return after card field "statusField"
  38. put return & " analyzing the stack script..." & return after ¬¨
  39. card field "statusField"
  40. scrollField
  41. unlock screen
  42. lock screen
  43. write return & " -> Stack Msg Handlers & Functions:" ¬¨
  44. & return to file theTextFile
  45. put "  " into theLeadSpace
  46. parseScript
  47. repeat with i = 1 to theBkgdCnt
  48. go to holdMyPlace
  49. put return & " analyzing background #" & i & "..." & return ¬¨
  50. after card field "statusField"
  51. scrollField
  52. unlock screen
  53. lock screen
  54. write return & "               ** BACKGROUND #" & i & " **" ¬¨
  55. & return & return to file theTextFile
  56. go to theTargetStack
  57. put the ID of background i into theTargetBkgd
  58. parseBkgd
  59. end repeat
  60. end parseStack
  61.  
  62. on parseBkgd
  63. global holdMyPlace, theTargetStack, theTextFile, theTextDump, ¬¨
  64. theScript, theLeadSpace, theTargetBkgd, theTargetField, ¬¨
  65. theTargetButton
  66. go to card 1 of background ID theTargetBkgd
  67. put the number of cards in this background into cardCounter
  68. write "  -> # of cards:" & cardCounter ¬¨
  69. & "   # of fields:" & the number of background fields ¬¨
  70. & "   # of buttons:" & the number of background buttons ¬¨
  71. & return to file theTextFile
  72. put "  # of fields = " & the number of background fields ¬¨
  73. & "    # of buttons = " & the number of background buttons ¬¨
  74. & "    # of cards = " & cardCounter ¬¨
  75. & return & "  analyzing the background script..." into statusLine
  76. push card
  77. go to holdMyPlace
  78. put statusLine after card field "statusField"
  79. scrollField
  80. unlock screen
  81. lock screen
  82. pop card
  83. write return & "  -> Background Properties:" ¬¨
  84. & return to file theTextFile
  85. write "   id:" & theTargetBkgd & ¬¨
  86. "   name:" & the short name of this background & return ¬¨
  87. to file theTextFile
  88. write "   don'tSearch:" & the dontSearch of this background & ¬¨
  89. "   cantDelete:" & the cantDelete of this background & return ¬¨
  90. to file theTextFile
  91. write return & "  -> Background Msg Handlers & Functions:" ¬¨
  92. & return to file theTextFile
  93. put the script of this background into theScript
  94. if theScript = empty then
  95. write "   -none-" & return to file theTextFile
  96. else
  97. put "   " into theLeadSpace
  98. parseScript
  99. end if
  100. write return & "  -> Background Fields:" ¬¨
  101. & return to file theTextFile
  102. put return & "  analyzing the background fields..." ¬¨
  103. & return into statusLine
  104. push card
  105. go to holdMyPlace
  106. put statusLine after card field "statusField"
  107. scrollField
  108. unlock screen
  109. lock screen
  110. pop card
  111. repeat with i = 1 to number of background fields
  112. put the ID of background field i into theTargetField
  113. parseBkgdFld
  114. end repeat
  115. write return to file theTextFile
  116. write return & "  -> Background Buttons:" ¬¨
  117. & return to file theTextFile
  118. put "  analyzing the background buttons..." ¬¨
  119. & return into statusLine
  120. push card
  121. go to holdMyPlace
  122. put statusLine after card field "statusField"
  123. scrollField
  124. unlock screen
  125. lock screen
  126. pop card
  127. repeat with i = 1 to number of background buttons
  128. put the ID of background button i into theTargetButton
  129. parseBkgdButton
  130. end repeat
  131. write return & "  -> 'Active' Cards" & return to file theTextFile
  132. parseCards
  133. end parseBkgd
  134.  
  135. on parseBkgdFld
  136. global theTextFile, theScript, theLeadSpace, theTargetField
  137. put "background field ID " & theTargetField into theField
  138. write "   - Bkgd Fld #" & the number of theField ¬¨
  139. & return to file theTextFile
  140. write "     - Properties:" & return to file theTextFile
  141. write "       id:" & theTargetField ¬¨
  142. & "  name:" & the short name of theField ¬¨
  143. & return to file theTextFile
  144. write "       textFont:" & the textFont of theField ¬¨
  145. & "   textSize:" & the textSize of theField ¬¨
  146. & "   textStyle:" & the textStyle of theField ¬¨
  147. & return to file theTextFile
  148. write "       visible:" & the visible of theField ¬¨
  149. & "   lockText:" & the lockText of theField ¬¨
  150. & "   dontSearch:" & the dontSearch of theField ¬¨
  151. & return to file theTextFile
  152. write "       textAlign:" & the textAlign of theField ¬¨
  153. & "   dontWrap:" & the dontWrap of theField ¬¨
  154. & return to file theTextFile
  155. write "       textHeight:" & the textHeight of theField ¬¨
  156. & "   fixedLineHeight:" & the fixedLineHeight of theField ¬¨
  157. & return to file theTextFile
  158. write "       style:" & the style of theField ¬¨
  159. & "   showLines:" & the showLines of theField ¬¨
  160. & return to file theTextFile
  161. write "       autoTab:" & the autoTab of theField ¬¨
  162. & "   wideMargins:" & the wideMargins of theField ¬¨
  163. & return to file theTextFile
  164. write "       top:" & the top of theField ¬¨
  165. & "  left:" & the left of theField ¬¨
  166. & "  right:" & the right of theField ¬¨
  167. & "  bottom:" & the bottom of theField ¬¨
  168. to file theTextFile
  169. write return & "     - Msg Handlers & Functions:" ¬¨
  170. & return to file theTextFile
  171. put "        " into theLeadSpace
  172. put the script of theField into theScript
  173. if theScript = empty then
  174. write "        -none-" & return to file theTextFile
  175. else
  176. put "      " into theLeadSpace
  177. parseScript
  178. end if
  179. end parseBkgdFld
  180.  
  181. on parseBkgdButton
  182. global theTextFile, theScript, theLeadSpace, theTargetButton
  183. put " background button ID " & theTargetButton into theButton
  184. write "   - Bkgd Button #" & the number of theButton ¬¨
  185. & return to file theTextFile
  186. write "     - Properties:" & return to file theTextFile
  187. write "       id:" & theTargetButton ¬¨
  188. & "  name:" & the short name of theButton ¬¨
  189. & return to file theTextFile
  190. write "       textFont:" & the textFont of theButton ¬¨
  191. & "   textSize:" & the textSize of theButton ¬¨
  192. & "   textStyle:" & the textStyle of theButton ¬¨
  193. & return to file theTextFile
  194. write "       visible:" & the visible of theButton ¬¨
  195. & "   style:" & the style of theButton ¬¨
  196. & "   showName:" & the showName of theButton ¬¨
  197. & return to file theTextFile
  198. write "       hilite:" & the hilite of theButton ¬¨
  199. & "   icon:" & the icon of theButton ¬¨
  200. & return to file theTextFile
  201. write "       sharedHilite:" & the sharedHilite of theButton ¬¨
  202. & "   autoHilite:" & the autoHilite of theButton ¬¨
  203. & return to file theTextFile
  204. write "       top:" & the top of theButton ¬¨
  205. & "  left:" & the left of theButton ¬¨
  206. & "  right:" & the right of theButton ¬¨
  207. & "  bottom:" & the bottom of theButton ¬¨
  208. to file theTextFile
  209. write return & "     - Msg Handlers & Functions:" ¬¨
  210. & return to file theTextFile
  211. put "        " into theLeadSpace
  212. put the script of theButton into theScript
  213. if theScript = empty then
  214. write "        -none-" & return to file theTextFile
  215. else
  216. put "      " into theLeadSpace
  217. parseScript
  218. end if
  219. end parseBkgdButton
  220.  
  221. on parseCards
  222. global theTextFile, theTextDump, theScript, theLeadSpace, ¬¨
  223. theTargetField, theTargetButton, holdMyPlace
  224. put "  scanning for card level fields/buttons/scripts..." ¬¨
  225. & return into statusLine
  226. push card
  227. go to holdMyPlace
  228. put statusLine after card field "statusField"
  229. scrollField
  230. unlock screen
  231. lock screen
  232. pop card
  233. go to last card of this background
  234. repeat for number of cards in this background
  235. go to next card in this background
  236. if the number of card buttons + the number of card fields ¬¨
  237. + the number of characters in the script of this card = 0 then
  238. next repeat
  239. else
  240. write "  - Card #: " & the number of this card ¬¨
  241. & return to file theTextFile
  242. repeat with i = 1 to number of card fields
  243. put the ID of card field i into theTargetField
  244. parseCardFld
  245. end repeat
  246. repeat with i = 1 to number of card buttons
  247. put the ID of card button i into theTargetButton
  248. parseCardButton
  249. end repeat
  250. end if
  251. end repeat
  252. end parseCards
  253.  
  254. on parseScript
  255. global theTextFile, theTextDump, theScript, theLeadSpace
  256. repeat with i = 1 to number of lines in theScript
  257. if theTextDump then
  258. write theLeadSpace & line i of theScript ¬¨
  259. & return to file theTextFile
  260. else
  261. if word 1 of line i of theScript = "on" or ¬¨
  262. word 1 of line i of theScript = "function" then
  263. write theLeadSpace & line i of theScript ¬¨
  264. & return to file theTextFile
  265. end if
  266. end if
  267. end repeat
  268. end parseScript
  269.  
  270. on parseCardFld
  271. global theTextFile, theScript, theLeadSpace, theTargetField
  272. put "card field ID " & theTargetField into theField
  273. write "   - Card Fld #" & the number of theField ¬¨
  274. & return to file theTextFile
  275. write "     - Properties:" & return to file theTextFile
  276. write "       id:" & theTargetField ¬¨
  277. & "  name:" & the short name of theField ¬¨
  278. & return to file theTextFile
  279. write "       textFont:" & the textFont of theField ¬¨
  280. & "   textSize:" & the textSize of theField ¬¨
  281. & "   textStyle:" & the textStyle of theField ¬¨
  282. & return to file theTextFile
  283. write "       visible:" & the visible of theField ¬¨
  284. & "   lockText:" & the lockText of theField ¬¨
  285. & "   dontSearch:" & the dontSearch of theField ¬¨
  286. & return to file theTextFile
  287. write "       textAlign:" & the textAlign of theField ¬¨
  288. & "   dontWrap:" & the dontWrap of theField ¬¨
  289. & return to file theTextFile
  290. write "       textHeight:" & the textHeight of theField ¬¨
  291. & "   fixedLineHeight:" & the fixedLineHeight of theField ¬¨
  292. & return to file theTextFile
  293. write "       style:" & the style of theField ¬¨
  294. & "   showLines:" & the showLines of theField ¬¨
  295. & return to file theTextFile
  296. write "       autoTab:" & the autoTab of theField ¬¨
  297. & "   wideMargins:" & the wideMargins of theField ¬¨
  298. & return to file theTextFile
  299. write "       top:" & the top of theField ¬¨
  300. & "  left:" & the left of theField ¬¨
  301. & "  right:" & the right of theField ¬¨
  302. & "  bottom:" & the bottom of theField ¬¨
  303. to file theTextFile
  304. write return & "     - Msg Handlers & Functions:" ¬¨
  305. & return to file theTextFile
  306. put "        " into theLeadSpace
  307. put the script of theField into theScript
  308. if theScript = empty then
  309. write "        -none-" & return to file theTextFile
  310. else
  311. put "      " into theLeadSpace
  312. parseScript
  313. end if
  314. end parseCardFld
  315.  
  316. on parseCardButton
  317. global theTextFile, theScript, theLeadSpace, theTargetButton
  318. put " card button ID " & theTargetButton into theButton
  319. write "   - Card Button #" & the number of theButton ¬¨
  320. & return to file theTextFile
  321. write "     - Properties:" & return to file theTextFile
  322. write "       id:" & theTargetButton ¬¨
  323. & "  name:" & the short name of theButton ¬¨
  324. & return to file theTextFile
  325. write "       textFont:" & the textFont of theButton ¬¨
  326. & "   textSize:" & the textSize of theButton ¬¨
  327. & "   textStyle:" & the textStyle of theButton ¬¨
  328. & return to file theTextFile
  329. write "       visible:" & the visible of theButton ¬¨
  330. & "   style:" & the style of theButton ¬¨
  331. & "   showName:" & the showName of theButton ¬¨
  332. & return to file theTextFile
  333. write "       hilite:" & the hilite of theButton ¬¨
  334. & "   icon:" & the icon of theButton ¬¨
  335. & return to file theTextFile
  336. write "       sharedHilite:" & the sharedHilite of theButton ¬¨
  337. & "   autoHilite:" & the autoHilite of theButton ¬¨
  338. & return to file theTextFile
  339. write "       top:" & the top of theButton ¬¨
  340. & "  left:" & the left of theButton ¬¨
  341. & "  right:" & the right of theButton ¬¨
  342. & "  bottom:" & the bottom of theButton ¬¨
  343. to file theTextFile
  344. write return & "     - Msg Handlers & Functions:" ¬¨
  345. & return to file theTextFile
  346. put "        " into theLeadSpace
  347. put the script of theButton into theScript
  348. if theScript = empty then
  349. write "        -none-" & return to file theTextFile
  350. else
  351. put "      " into theLeadSpace
  352. parseScript
  353. end if
  354. end parseCardButton
  355.  
  356. on scrollField
  357. if (the number of lines in card field "statusField" ¬¨
  358. * the textHeight of card field "statusField") ¬¨
  359. > (the bottom of card field "statusField" ¬¨
  360. - the top of card field "statusField") then
  361. set the scroll of card field "statusField" to ¬¨
  362. (the number of lines in card field "statusField" ¬¨
  363. * the textHeight of card field "statusField") ¬¨
  364. - (the bottom of card field "statusField" ¬¨
  365. - the top of card field "statusField")
  366. end if
  367. end scrollField</script>
  368.     <background id="2652" file="background_2652.xml" name="" />
  369.     <card id="2871" file="card_2871.xml" marked="false" name="" owner="2652" />
  370. </stack>
  371.